package com.example.core;

public class BusinessException extends RuntimeException {
    private String code;
    private String message;

    public BusinessException(ErrorCodeMsg errorCodeMsg) {
        super(errorCodeMsg.getMessage());
        this.code = errorCodeMsg.getCode();
        this.message = errorCodeMsg.getMessage();
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
